// Generate a two-color caret for any element.
@mixin double-caret($background: var(--color-bg-primary), $border: var(--color-border-primary)) {
  &::after,
  &::before {
    position: absolute;
    top: 11px;
    right: 100%;
    left: -8px;
    display: block;
    width: 8px;
    height: 16px;
    pointer-events: none;
    content: " ";
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
  }

  &::after {
    margin-left: 1px;
    background-color: var(--color-bg-primary);
    background-image: linear-gradient($background, $background);
  }

  &::before {
    background-color: $border;
  }
}
